package com.gitee.srurl.core.util;

import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author zxw
 * @date 2023/4/30 10:59
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public abstract class DateUtil {

    /**
     * 半年后的时间（全部按照366天计算）
     *
     * @return
     */
    public static LocalDateTime halfYearAfter() {
        return DateTime.now().offset(DateField.DAY_OF_YEAR, 366 / 2).toLocalDateTime();
    }
}
